#include "InSignal.h"

InSignal::InSignal()
{
	
	
}

InSignal::InSignal(UInt16 rawMax, UInt16 rawMin, UInt16 physMax, UInt16 physMin, const UInt8 FilterCoeffs[]): 
	Signal(rawMax, rawMin, physMax, physMin), filter(FilterCoeffs)
{}

void InSignal::setRawValue(UInt16 v)
{
	this->filter.add(v);
}

UInt16 InSignal::getPhysValue()
{
	UInt16 rawValueFiltered = this->filter.get();
	return this->raw2phys(rawValueFiltered);
}